﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Web
{
    public partial class num : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string webnum = string.IsNullOrEmpty(Request.Form["num"]) ? Request.QueryString["num"] : Request.Form["num"];
            Set(webnum);
        }

        protected void Set(string cs)
        {
            string path = System.Web.HttpContext.Current.Server.MapPath("/bb.html");
            //写入
            StreamWriter sr = null;
            try
            {
                sr = File.CreateText(path);
                sr.WriteLine(cs);
            }
            catch (Exception err)
            {
                Response.Write(err.Message);
            }
            finally
            {
                if (sr != null)
                    sr.Close();
            }
        }
    }
}